#ifndef PROGRAM_DATASTRUCT_SINGLELIST_H_
#define PROGRAM_DATASTRUCT_SINGLELIST_H_

namespace singlelist{
class ListElmt
{
public:
    ListElmt(int data);
public:
    void SetData(int d);
    void SetNext(ListElmt* n);

    int GetData();
    ListElmt* GetNext();
private:
    int m_data;
    ListElmt* m_next;
};

class SingleList
{
public:
    SingleList();
    ~SingleList();
public:
    ListElmt* ListHead();
    ListElmt* ListTail();
    void ListInsert(ListElmt* e);
    ListElmt* ListDelNext(ListElmt* e);

    int GetListSize();
private:
    ListElmt* m_head;
    ListElmt* m_tail;
    int m_size;
};

void PrintSingleList(SingleList* l);
}
#endif // PROGRAM_DATASTRUCT_SINGLELIST_H_
